package com.kgc.ljp.WriterDemo;

import java.io.IOException;
import java.io.PrintWriter;


import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

    public class SyncWriteDemo {
        public static void main(String[] args)
                throws IOException {
            Scanner in = new Scanner(System.in);
            String file = "sync.txt";
            PrintWriter out = new PrintWriter(file,"UTF-8");
            while(true){
                String str = in.nextLine();
                out.println(str);
                if("q".equalsIgnoreCase(str)){
                    break;
                }
            }
            out.close();
        }
    }

